<template>
  <div class="tip_operation">
    <topbar_back back-url="index" back-content="返回主界面"
                 center-content="asd" content-color="asd" is-show-center="false"></topbar_back>
    <div class="middle">
      <div class="img_wrap">
        <img :src="successIcon">
      </div>
      <div class="tip_wrap">
        <span class="text">{{tiptitle}}</span>
      </div>
    </div>
    <div class="bottom">
      <div class="left">
        <router-link :to="leftTo">
          <span class="text">{{$route.params.leftcontent}}</span>
          <img  class="icon" :src="enterIconBlue">
        </router-link>
      </div>
      <div class="right">
        <router-link :to="rightTo">
          <img  class="icon" :src="enterIconGreen">
          <span class="text">{{$route.params.rightcontent}}</span>
        </router-link>
      </div>
    </div>
  </div>
</template>

<script>
import topbarBack from '../../components/public/topbar_back'
import backIcon from '../../assets/img/icon/personal_homepage_btn_bac.svg'
import successIcon from '../../assets/img/icon/icon_green.svg'
import enterIconGreen from '../../assets/img/icon/enter_green.svg'
import enterIconBlue from '../../assets/img/icon/enter_blue.svg'
export default {
  name: 'tip_operation',
  data () {
    return {
      backIcon: backIcon,
      successIcon: successIcon,
      enterIconGreen: enterIconGreen,
      enterIconBlue: enterIconBlue,
      // leftcontent: '',
      // lefturl: '',
      // lefturltype: '',
      // rightcontent: '',
      // righturl: '',
      // righturltype: '',
      tiptitle: '',
      leftTo: {},
      rightTo: {}
    }
  },
  components: {
    topbar_back: topbarBack
  },
  mounted () {
    this.tiptitle = this.$route.params.tiptitle
    // if (this.$route.params.leftcontent === '继续上传') {
    //   this.leftTo = {
    //     name: this.$route.params.lefturl,
    //     params: {
    //       type: this.$route.params.lefturltype
    //     }
    //   }
    // }
    // if (this.$route.params.rightcontent === '查看已上传') {
    //   this.rightTo = {
    //     name: this.$route.params.righturl,
    //     params: {
    //       type: this.$route.params.righturltype
    //     }
    //   }
    // }
    this.leftTo = {
      name: this.$route.params.lefturl,
      params: {
        type: this.$route.params.lefturltype
      }
    }
    this.rightTo = {
      name: this.$route.params.righturl,
      params: {
        type: this.$route.params.righturltype
      }
    }
    this.$route.meta.footChoose = this.$route.params.footChoose
  }
}
</script>

<style lang="scss" scoped>
.tip_operation{
  width: 100%;
  height: 100%;
  background-color: #FFF;
  font-size: px2rem(20);
  line-height: px2rem(20);
  .middle {
    width: 100%;
    height: px2rem(148);
    background-color: #FFF;
    .img_wrap{
      width: 100%;
      height: px2rem(80);
      /*border: px2rem(2) solid red;*/
      margin-top: px2rem(115);
      text-align: center;
      img{
        width: px2rem(80);
        height: px2rem(80);
      }
    }
    .tip_wrap{
      width: 80%;
      height: px2rem(40);
      line-height: px2rem(40);
      /*border: px2rem(2) solid red;*/
      margin: px2rem(28) auto 0;
      text-align: center;
      .text{
        font-size: px2rem(28);
        font-weight: bold;
        color: $text-color;
      }
    }
  }
  .bottom{
    width: 85%;
    height: px2rem(46);
    background-color: #FFF;
    margin: px2rem(29) auto 0;
    @mixin wrap{
      width: px2rem(100);
      height: px2rem(46);
      line-height: px2rem(46);
      /*border: px2rem(1) solid red;*/
    }
    @mixin icon{
      display: block;
      width: px2rem(12);
      height: px2rem(20);
      /*border: px2rem(2) solid red;*/
      margin-top: px2rem(13);
    }
    .left{
      @include wrap;
      float: left;
      .text{
        float: left;
        font-size: $text-size-normal;
        color: #1270E3;
        /*border: px2rem(2) solid red;*/
      }
      .icon {
        @include icon;
        float: left;
      }
    }
    .right {
      @include wrap;
      float: right;
      .text {
        float: right;
        font-size: $text-size-normal;
        color: #5ECC49;
        /*border: px2rem(2) solid red;*/
      }
      .icon {
        @include icon;
        float: right;
      }
    }
  }
}
</style>
